package com.spring.study.starterdemo.controller;

import com.spring.study.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StarterController {

    @Autowired
    private DemoService demoService;

    @RequestMapping("/api/{word}")
    public String getWord(@PathVariable(name = "word")String word){

        return demoService.wrap(word);
    }
}
